package com.study.controller;

import com.study.entity.PreUser;
import com.study.entity.User;
import com.study.entity.ValueModel;
import com.study.profile.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @Autowired
    private User user;

    @Autowired
    private ValueModel valueModel;

    @Autowired
    private PreUser preUser;

    @Autowired
    private Person person;

    @RequestMapping("/index")
    public void index() {

        System.out.println("user:" + user.toString());
        System.out.println("valueModel:");
        valueModel.output();
        System.out.println("PreUser:" + preUser.toString());

        person.say();
    }

}
